Help
RSS
API
Feed
Maltego
Contact
Domain > bdulac.github.io
×
Welcome!
Right click nodes and scroll the mouse to navigate the graph.
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2016-05-10
23.235.46.133
(
ClassC
)
2024-07-07
185.199.110.153
(
ClassC
)
Port 80
HTTP/1.1 200 OKConnection: keep-aliveContent-Length: 35014Server: GitHub.comContent-Type: text/html; charsetutf-8permissions-policy: interest-cohort()Last-Modified: Fri, 07 Apr 2017 12:27:07 GMTAccess-Control-Allow-Origin: *ETag: 58e7859b-88c6expires: Sun, 07 Jul 2024 20:03:06 GMTCache-Control: max-age600x-proxy-cache: MISSX-GitHub-Request-Id: 95A8:371505:106D62C:111C8AB:668AF222Accept-Ranges: bytesAge: 0Date: Sun, 07 Jul 2024 19:53:06 GMTVia: 1.1 varnishX-Served-By: cache-bfi-krnt7300094-BFIX-Cache: MISSX-Cache-Hits: 0X-Timer: S1720381987.770715,VS0,VE73Vary: Accept-EncodingX-Fastly-Request-ID: c1c11d8f499b4b48b2ebf2bd72572402256daa4c !DOCTYPE html>html langen>head> link hrefhttp://gmpg.org/xfn/11 relprofile> meta http-equivcontent-type contenttext/html; charsetutf-8> title>Notes of a (Java) developer · blog/title> meta namemobile-web-app-capable contentyes> meta nameHandheldFriendly contentTrue /> meta nameMobileOptimized content320 /> meta nameviewport contentwidthdevice-width, initial-scale1.0 /> link relstylesheet typetext/css mediaonly screen and (min-width: 1001px) href/assets/css/desktop.css /> link relstylesheet typetext/css mediaonly screen and (max-width: 1000px) href/assets/css/mobile.css /> link href/assets/css/genericons.css typetext/css relstylesheet /> link href/assets/css/syntax.css typetext/css relstylesheet /> link relstylesheet hrefhttp://fonts.googleapis.com/css?familyPT+Serif:400,400italic,700|PT+Sans:400 :> link relapple-touch-icon hrefhttp://bdulac.github.io/assets/images/home.png /> link relshortcut icon hrefhttp://bdulac.github.io/assets/images/favicon.ico /> link relalternate typeapplication/rss+xml titleRSS hrefhttp://bdulac.github.io/atom.xml /> link hrefhttp://fonts.googleapis.com/css?familyPoiret+One relstylesheet typetext/css>/head>body>div idcontainer>header> label classmenu for_1> span classgenericon genericon-menu>/span>/label>input id_1 typecheckbox>div classmenu-content> div classmenu stylebackground-color: #777; z-index: -1;>/div> a href/>Blog/a>br> a href/about/>About/a>br> a href/point-of-view/>Point of views/a>br> a href/programming-practice/>Programming/a>br> a href/web/>Web/a>br> a href/java/>Java/a>br> a href/categories/>More categories.../a>br> /div>div classsocial-links> a hrefhttp://facebook.com/berenger.dulac target_blank titleJoin me on Facebook>span classgenericon genericon-facebook>/span>/a> a hrefhttps://github.com/bdulac target_blank titleFork me on github>span classgenericon genericon-github>/span>/a> a hrefhttp://bdulac.github.io/atom.xml target_blank titleSubscribe to my Atom feed>span classgenericon genericon-feed>/span>/a> a hrefhttp://bdulac.github.io/feed.xml target_blank titleSubscribe to my RSS feed>span classgenericon genericon-feed>/span>/a> /div> div idhome-title> h1>Notes of a (Java) developer/h1> /div>/header> div idpost-list itemscope itemtypehttp://schema.org/Blog> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developers/span> span itempropaudienceType>Programmers/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://www.facebook.com/berenger.dulac /> link itempropsameAs hrefhttp://bdulac.github.io /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> article itempropblogPost itemscope itemtypehttp://schema.org/BlogPosting> header> link itempropurl href/note/compile-time-checking-java /> meta itempropheadline hrefCompile-time checking in Java /> h1>a href/note/compile-time-checking-java>span itempropname>Compile-time checking in Java/span>/a>/h1> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developer/span> span itempropaudienceType>Programmer/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://facebook.com/berenger.dulac /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> /header> main> div itempropmainEntityOfPage id/note/compile-time-checking-java classpost-content> p>In a a hrefhttp://bdulac.github.io/note/apple-ssl-case>previous post/a> I wrote about code quality: in a few words, I believe in span itempropabout>a itempropsameAs hrefhttp://en.wikipedia.org/wiki/Static_program_analysis>static-checking/a>/span>. Static means without executing the program. In a software process point of view, this would imply before runtime, in other words at compile-time. For a developer, it can be very useful to have such a verification simply with a compilation, without executing a specific tool (by the way, some very interesting software of that kind are available, just a hrefhttp://findbugs.sourceforge.net/>Findbugs/a> for example)./p>p>Here is the point: how would it be possible to proceed that kind of control without rewriting a compiler from scratch ?/p>p>The b>em>a hrefhttp://bdulac.github.io/java/>Java/a>/em>/b> platform provides a very interesting feature to perform such operations: a hrefhttp://docs.oracle.com/javase/tutorial/java/annotations/>annotations/a> (a hrefhttps://www.jcp.org/en/jsr/detail?id175>JSR 175/a>). These are metadata a hrefhttp://docs.oracle.com/javase/tutorial/java/annotations/declaring.html>defined as java types/a>. Annotations have been introduced in the Java language starting with Java SE 5. b itempropabout>Annotations/b> can be processed at b itempropabout>compile-time/b> or runtime./p>!--p>@see https://blogs.oracle.com/java-platform-group/entry/java_8_s_new_type/p>-->p>The Sun Java SE distribution provided from the starting point a facility for annotation processing at compile-time called a hrefhttp://docs.oracle.com/javase/1.5.0/docs/guide/apt/>APT/a> (for Annotation Processing Tool). This was a vendor-specific feature (in em>Sun/em> packages) executed in a specific and eponymous command line tool./p>p>Since Java 6, that function is part of the platform with a hrefhttps://www.jcp.org/en/jsr/detail?id269>JSR 269/a> (em>a hrefhttp://docs.oracle.com/javase/6/docs/api/javax/annotation/processing/package-summary.html>javax.annotation.processing/a>/em> package, reference implementation part of the a hrefhttps://jcp.org/aboutJava/communityprocess/mrel/jsr269/index2.html>Java SE/a> distribution). The contributed processing can be executed along compilation. With Java SE 8, the historical APT packaging and specific tool a hrefhttp://openjdk.java.net/jeps/117>is removed/a> (after a hrefdocs.oracle.com/javase/7/docs/technotes/guides/apt/>deprecation in Java SE 7/a>)./p>p>If the topic seems basic for the Java platform, there is a lack of exhaustive documentation for annotation processors development. I found some precious informations in span itempropcitation itemscope itemtypehttp://schema.org/BlogPosting> a itempropurl hrefhttps://dzone.com/articles/using-java-6-processors> em>Using Java 6 processors in Eclipse/em> /a> , a blog post by span itempropauthor itemscope itemtypehttp://schema.org/Person> a itempropsameAs hrefhttps://github.com/kallebertell> span itempropname> span itempropgivenName>Carl-Petter/span> span itempropfamilyName>Bertell/span> /span> /a> /span>/span>.The a href../eclipse/platform/>Eclipse platform/a> provide very precious functions with the a hrefhttp://www.eclipse.org/jdt/apt/>JDT-APT project/a>./p>p>span itempropcitation itemscope itemtypehttp://schema.org/Creativework>A very interesting a itempropurl hrefhttp://www.eclipse.org/jdt/apt/eclipsecon2007.zip> span itemproplearningResourceType>presentation/span> at EclipseCon 2007 /a> by span itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname> span itempropgivenName>Walter/span> span itempropfamilyName>Harley/span> /span>, /span> span itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname> span itempropgivenName>Gary/span> span itempropfamilyName>Horen/span> /span> /span> and span itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname> span itempropgivenName>Jess/span> span itempropfamilyName>Garms/span> /span> /span> from span itempropauthor itemscope itemtypehttp://schema.org/Organization> a itempropsameAs hrefhttp://en.wikipedia.org/wiki/BEA_Systems> span itemproplegalName>BEA systems/span> /a> /span> develops many important points about compile-time checking: what could be done with annotation processors and what requires more. For example, the processor does not provide the structure of the a hrefhttp://en.wikipedia.org/wiki/Abstract_syntax_tree>AST/a> and thereby b>does not allow flow analysis/b>./span>/p>p>A b itempropabout>processor/b> must implement the b itempropabout>em>a hrefhttp://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html>javax.annotation.processing.Processor/a>/em> interface/b>. The implementation should be b>specified/b> to the platform b>using the a hrefhttp://bdulac.github.io/note/spi>SPI/a>/b> system. An abstract class em>a hrefhttp://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/AbstractProcessor.html>AbstractProcessor/a>/em> is provided to help implementations./p>p> In a span itempropcitation itemscope itemtypehttp://schema.org/Article> a itempropurl hrefhttp://www.alexecollins.com/java-annotation-processor-tutorial/> tutorial about annotation processing, /a> span itempropauthor itemscope itemtypehttp://schema.org/Person> a itempropsameAs hrefhttps://github.com/alexec> span itempropname> span itempropgivenName>Alex/span> span itempropfamilyName>Collins/span> /span> /a> link itempropsameAs hrefhttp://www.alexecollins.com /> /span> details the span itempropabout>implementation of a compile-time processor/span> for the a itempropabout hrefhttp://docs.spring.io/autorepo/docs/spring/4.2.x/javadoc-api/org/springframework/transaction/annotation/Transactional.html> @Transactional annotation of the spring framework /a>. /span>/p> /div> /main> footer> div classcategories> span classcategory itempropabout> a href/java/> JAVA /a> /span> span classcategory itempropabout> a href/software/quality/> SOFTWARE QUALITY /a> /span> span classcategory itempropabout> a href/software/engineering/> SOFTWARE ENGINEERING /a> /span> span classcategory itempropabout> a href/programming-practice/> PROGRAMMING PRACTICE /a> /span> /div> span classpost-date> time datetime2016-07-18 itempropdatePublished> 18 July 2016 /time> /span> /footer>/article> article itempropblogPost itemscope itemtypehttp://schema.org/BlogPosting> header> link itempropurl href/note/lucene-map /> meta itempropheadline hrefA Lucene-based map /> h1>a href/note/lucene-map>span itempropname>A Lucene-based map/span>/a>/h1> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developer/span> span itempropaudienceType>Programmer/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://facebook.com/berenger.dulac /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> /header> main> div itempropmainEntityOfPage id/note/lucene-map classpost-content> p>Last year I needed to store strings in a em>a hrefhttps://docs.oracle.com/javase/7/docs/api/java/util/Map.html>Java Map/a>/em> using a limited memory./p>p>The solution was rather simple: using a em>a hrefhttps://lucene.apache.org/core/>Lucene/a>/em> index to store the content on disk. This would provide interesting access performances. Here is the em>Gist/em>:/p>p>script srchttps://gist.github.com/bdulac/2ba47e38b383fb885427.js>/script>/p> /div> /main> footer> div classcategories> span classcategory itempropabout> a href/java/> JAVA /a> /span> /div> span classpost-date> time datetime2016-01-29 itempropdatePublished> 29 January 2016 /time> /span> /footer>/article> article itempropblogPost itemscope itemtypehttp://schema.org/BlogPosting> header> link itempropurl href/note/solr-memory-mmap /> meta itempropheadline hrefApache Solr: JVM memory management and em>mmap/em> system calls /> h1>a href/note/solr-memory-mmap>span itempropname>Apache Solr: JVM memory management and em>mmap/em> system calls/span>/a>/h1> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developer/span> span itempropaudienceType>Programmer/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://facebook.com/berenger.dulac /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> /header> main> div itempropmainEntityOfPage id/note/solr-memory-mmap classpost-content> p>Unlike other indexing software like em>a hrefhttps://github.com/elastic/elasticsearch>Elasticsearch/a>/em>, em>Solr/em> can be deployed in any a hrefhttp://en.wikipedia.org/wiki/Web_container>em>Java Servlet/em> container/a>. The documentation provides an a hrefhttps://wiki.apache.org/solr/SolrTomcat>example with em>Apache Tomcat/em>/a>: this is our target environment at the em>MNHN/em>. Just like a standard em>Tomcat/em> installation, here comes the question of memory allocation to the JVM. Reading the a hrefhttps://wiki.apache.org/solr/SolrPerformanceFactors#Memory_allocated_to_the_Java_VM >em>Solr/em> section on the topic/a>, it was chosen to allow a large part of the RAM to the JVM (5GB on a total of 6: one single spared for the system). /p>p>We identified quickly a main problem: while indexing, the em>Solr/em> engine issued em>timeout/em> errors on em>select/em> queries. A a hrefhttp://stackoverflow.com/q/14635381/1207019>stackoverflow exchange/a> describes a similar behavior. We noticed on the server side an important usage of a hrefhttp://en.wikipedia.org/wiki/Virtual_memory>virtual memory/a>./p>p>As I answered in the exchange, we solved this problem a few months ago after reading a a hrefhttp://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html>blog post/a> by Uwe Schindler (a em>Solr/em> committer). With em>Solr 4/em> and several em>Solr 3/em> versions, you have to let an important share of your RAM free so that the system can use properly the em>mmap/em> system call. This is due to the introduction in em>Solr/em> of a new em>Lucene/em> component: the em>a hrefhttps://lucene.apache.org/core/3_5_0/api/core/org/apache/lucene/store/MMapDirectory.html>MMapDirectory/a>/em>. The blog post gives a plenty of informations on the system configuration. In our case, this solved the problem: we could finally index without any more em>timeout/em> issue./p> /div> /main> footer> div classcategories> span classcategory itempropabout> a href/java/> JAVA /a> /span> span classcategory itempropabout> a href/solr/> SOLR /a> /span> /div> span classpost-date> time datetime2015-04-12 itempropdatePublished> 12 April 2015 /time> /span> /footer>/article> article itempropblogPost itemscope itemtypehttp://schema.org/BlogPosting> header> link itempropurl href/note/sysml-callout /> meta itempropheadline hrefSysML Callout and UML /> h1>a href/note/sysml-callout>span itempropname>SysML Callout and UML/span>/a>/h1> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developer/span> span itempropaudienceType>Programmer/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://facebook.com/berenger.dulac /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> /header> main> div itempropmainEntityOfPage id/note/sysml-callout classpost-content> div>p>Recently, I participated in a a hrefhttp://stackoverflow.com/q/28084190/1207019>Stackoverflow exchange about the SysML em>Callout/em> concept/a>. The exchange was started in a wrong direction: the initial question was only about the UML language. This was a misconception as the em>Callout/em> node is a a hrefhttp://en.wikipedia.org/wiki/Systems_Modeling_Language>SysML/a> concept and that led to an inappropriate accepted answer which was in fact a non answer./p>p>I write this blog post because I think the topic is an important element in modeling. SysML is a UML profile defined in the frame of the OMG. The a target_blank hrefhttp://www.omg.org/spec/SysML/1.3/>SysML 1.3 formal specification/a> poorly defines the term as the effective conceptual definition appears in Annex A, p. 168:/p>pre>The callout notation provides a mechanism for representing relationships between model elements that appear on different diagram kinds./pre>p>Things become more complex to find the proper way to render a em>Callout/em>. More indications are available in the em>Allocation/em> section (p. 129):/p>pre>The allocation relationship can provide an effective means for navigating the model by establishing cross relationships, and ensuring the various parts of the model are properly integrated./pre>p>Later (p. 131):/p>pre>An «allocate» property callout uses the same shorthand notation as the «allocate» property compartment. This notation is also shown in Table 15.1./pre>p>Here is the table explaining the notation of allocations:/p>img src/assets/images/allocation.png styleborder-style: solid; />p>In some way, the SysML em>Callout/em> overlaps the em>CallBehaviorAction/em> action defined in the a target_blank hrefhttp://www.omg.org/spec/UML/2.4.1/>UML Superstructure 2.4.1 formal specification/a>, section 1.3.9 on p. 251. This is probably because SysML, as an UML profile, relies on the UML infrastructure./p>p>To be synthetic, relationships between model elements that appear on different diagrams are an important part of modeling. But the representation of a em>Callout/em> is, in my opinion, not very simple and clear./p>/div> /div> /main> footer> div classcategories> span classcategory itempropabout> STACKOVERFLOW /span> span classcategory itempropabout> a href/uml/> UML /a> /span> span classcategory itempropabout> SYSML /span> /div> span classpost-date> time datetime2015-01-25 itempropdatePublished> 25 January 2015 /time> /span> /footer>/article> article itempropblogPost itemscope itemtypehttp://schema.org/BlogPosting> header> link itempropurl href/note/polymeria-pages /> meta itempropheadline hrefPolymeria pages and Material Jekyll /> h1>a href/note/polymeria-pages>span itempropname>Polymeria pages and Material Jekyll/span>/a>/h1> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developer/span> span itempropaudienceType>Programmer/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://facebook.com/berenger.dulac /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> /header> main> div itempropmainEntityOfPage id/note/polymeria-pages classpost-content> div>p>I recently set up the a hrefhttp://bdulac.github.io/polymeria/>GitHub pages of the em>Polymeria/em> project/a>. This was done easily starting with the a hrefhttp://charbelrami.github.io/material-jekyll/>em>Material Jekyll/em>/a> project by a hrefhttps://github.com/charbelrami>Charbel Rami/a>./p>p>em>Material Jekyll/em> is a set of em>Polymer/em> components helping to set up a em>Jekyll/em> template. Few modifications where needed, a hrefhttps://github.com/charbelrami/material-jekyll/pull/2>one was pushed/a> to the initial repository as it could be useful to other users: colors customization with a single em>Jekyll/em> data file./p>/div> /div> /main> footer> div classcategories> span classcategory itempropabout> a href/web/> WEB /a> /span> span classcategory itempropabout> JEKYLL /span> span classcategory itempropabout> WEB COMPONENTS /span> span classcategory itempropabout> POLYMER /span> span classcategory itempropabout> GITHUB /span> /div> span classpost-date> time datetime2015-01-24 itempropdatePublished> 24 January 2015 /time> /span> /footer>/article> /div>nav classpagination rolenavigation> a classnewer-posts href/page2>← Older posts/a> span classpage-number>Page 1 of 5/span> /nav>footer classclean stylebackground-image: url(/assets/images/background.png); background-position: bottom; height: 60px;> p classcopyright>©2017, a hrefhttps://github.com/bdulac target_blank>Bérenger Dulac/a>. a hrefhttp://creativecommons.org/licenses/by-nc/2.5 target_blank>Some rights reserved/a>./p>/footer>/div>div>/div>/body>/html>
Port 443
HTTP/1.1 200 OKConnection: keep-aliveContent-Length: 35014Server: GitHub.comContent-Type: text/html; charsetutf-8permissions-policy: interest-cohort()Last-Modified: Fri, 07 Apr 2017 12:27:07 GMTAccess-Control-Allow-Origin: *ETag: 58e7859b-88c6expires: Sun, 07 Jul 2024 20:03:06 GMTCache-Control: max-age600x-proxy-cache: MISSX-GitHub-Request-Id: 2A24:2071D6:103E15C:10EBF41:668AF222Accept-Ranges: bytesAge: 0Date: Sun, 07 Jul 2024 19:53:06 GMTVia: 1.1 varnishX-Served-By: cache-bfi-krnt7300070-BFIX-Cache: MISSX-Cache-Hits: 0X-Timer: S1720381987.896238,VS0,VE89Vary: Accept-EncodingX-Fastly-Request-ID: 4430c82e6803c5fa73aad67f9d181c5827b57b6c !DOCTYPE html>html langen>head> link hrefhttp://gmpg.org/xfn/11 relprofile> meta http-equivcontent-type contenttext/html; charsetutf-8> title>Notes of a (Java) developer · blog/title> meta namemobile-web-app-capable contentyes> meta nameHandheldFriendly contentTrue /> meta nameMobileOptimized content320 /> meta nameviewport contentwidthdevice-width, initial-scale1.0 /> link relstylesheet typetext/css mediaonly screen and (min-width: 1001px) href/assets/css/desktop.css /> link relstylesheet typetext/css mediaonly screen and (max-width: 1000px) href/assets/css/mobile.css /> link href/assets/css/genericons.css typetext/css relstylesheet /> link href/assets/css/syntax.css typetext/css relstylesheet /> link relstylesheet hrefhttp://fonts.googleapis.com/css?familyPT+Serif:400,400italic,700|PT+Sans:400 :> link relapple-touch-icon hrefhttp://bdulac.github.io/assets/images/home.png /> link relshortcut icon hrefhttp://bdulac.github.io/assets/images/favicon.ico /> link relalternate typeapplication/rss+xml titleRSS hrefhttp://bdulac.github.io/atom.xml /> link hrefhttp://fonts.googleapis.com/css?familyPoiret+One relstylesheet typetext/css>/head>body>div idcontainer>header> label classmenu for_1> span classgenericon genericon-menu>/span>/label>input id_1 typecheckbox>div classmenu-content> div classmenu stylebackground-color: #777; z-index: -1;>/div> a href/>Blog/a>br> a href/about/>About/a>br> a href/point-of-view/>Point of views/a>br> a href/programming-practice/>Programming/a>br> a href/web/>Web/a>br> a href/java/>Java/a>br> a href/categories/>More categories.../a>br> /div>div classsocial-links> a hrefhttp://facebook.com/berenger.dulac target_blank titleJoin me on Facebook>span classgenericon genericon-facebook>/span>/a> a hrefhttps://github.com/bdulac target_blank titleFork me on github>span classgenericon genericon-github>/span>/a> a hrefhttp://bdulac.github.io/atom.xml target_blank titleSubscribe to my Atom feed>span classgenericon genericon-feed>/span>/a> a hrefhttp://bdulac.github.io/feed.xml target_blank titleSubscribe to my RSS feed>span classgenericon genericon-feed>/span>/a> /div> div idhome-title> h1>Notes of a (Java) developer/h1> /div>/header> div idpost-list itemscope itemtypehttp://schema.org/Blog> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developers/span> span itempropaudienceType>Programmers/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://www.facebook.com/berenger.dulac /> link itempropsameAs hrefhttp://bdulac.github.io /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> article itempropblogPost itemscope itemtypehttp://schema.org/BlogPosting> header> link itempropurl href/note/compile-time-checking-java /> meta itempropheadline hrefCompile-time checking in Java /> h1>a href/note/compile-time-checking-java>span itempropname>Compile-time checking in Java/span>/a>/h1> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developer/span> span itempropaudienceType>Programmer/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://facebook.com/berenger.dulac /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> /header> main> div itempropmainEntityOfPage id/note/compile-time-checking-java classpost-content> p>In a a hrefhttp://bdulac.github.io/note/apple-ssl-case>previous post/a> I wrote about code quality: in a few words, I believe in span itempropabout>a itempropsameAs hrefhttp://en.wikipedia.org/wiki/Static_program_analysis>static-checking/a>/span>. Static means without executing the program. In a software process point of view, this would imply before runtime, in other words at compile-time. For a developer, it can be very useful to have such a verification simply with a compilation, without executing a specific tool (by the way, some very interesting software of that kind are available, just a hrefhttp://findbugs.sourceforge.net/>Findbugs/a> for example)./p>p>Here is the point: how would it be possible to proceed that kind of control without rewriting a compiler from scratch ?/p>p>The b>em>a hrefhttp://bdulac.github.io/java/>Java/a>/em>/b> platform provides a very interesting feature to perform such operations: a hrefhttp://docs.oracle.com/javase/tutorial/java/annotations/>annotations/a> (a hrefhttps://www.jcp.org/en/jsr/detail?id175>JSR 175/a>). These are metadata a hrefhttp://docs.oracle.com/javase/tutorial/java/annotations/declaring.html>defined as java types/a>. Annotations have been introduced in the Java language starting with Java SE 5. b itempropabout>Annotations/b> can be processed at b itempropabout>compile-time/b> or runtime./p>!--p>@see https://blogs.oracle.com/java-platform-group/entry/java_8_s_new_type/p>-->p>The Sun Java SE distribution provided from the starting point a facility for annotation processing at compile-time called a hrefhttp://docs.oracle.com/javase/1.5.0/docs/guide/apt/>APT/a> (for Annotation Processing Tool). This was a vendor-specific feature (in em>Sun/em> packages) executed in a specific and eponymous command line tool./p>p>Since Java 6, that function is part of the platform with a hrefhttps://www.jcp.org/en/jsr/detail?id269>JSR 269/a> (em>a hrefhttp://docs.oracle.com/javase/6/docs/api/javax/annotation/processing/package-summary.html>javax.annotation.processing/a>/em> package, reference implementation part of the a hrefhttps://jcp.org/aboutJava/communityprocess/mrel/jsr269/index2.html>Java SE/a> distribution). The contributed processing can be executed along compilation. With Java SE 8, the historical APT packaging and specific tool a hrefhttp://openjdk.java.net/jeps/117>is removed/a> (after a hrefdocs.oracle.com/javase/7/docs/technotes/guides/apt/>deprecation in Java SE 7/a>)./p>p>If the topic seems basic for the Java platform, there is a lack of exhaustive documentation for annotation processors development. I found some precious informations in span itempropcitation itemscope itemtypehttp://schema.org/BlogPosting> a itempropurl hrefhttps://dzone.com/articles/using-java-6-processors> em>Using Java 6 processors in Eclipse/em> /a> , a blog post by span itempropauthor itemscope itemtypehttp://schema.org/Person> a itempropsameAs hrefhttps://github.com/kallebertell> span itempropname> span itempropgivenName>Carl-Petter/span> span itempropfamilyName>Bertell/span> /span> /a> /span>/span>.The a href../eclipse/platform/>Eclipse platform/a> provide very precious functions with the a hrefhttp://www.eclipse.org/jdt/apt/>JDT-APT project/a>./p>p>span itempropcitation itemscope itemtypehttp://schema.org/Creativework>A very interesting a itempropurl hrefhttp://www.eclipse.org/jdt/apt/eclipsecon2007.zip> span itemproplearningResourceType>presentation/span> at EclipseCon 2007 /a> by span itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname> span itempropgivenName>Walter/span> span itempropfamilyName>Harley/span> /span>, /span> span itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname> span itempropgivenName>Gary/span> span itempropfamilyName>Horen/span> /span> /span> and span itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname> span itempropgivenName>Jess/span> span itempropfamilyName>Garms/span> /span> /span> from span itempropauthor itemscope itemtypehttp://schema.org/Organization> a itempropsameAs hrefhttp://en.wikipedia.org/wiki/BEA_Systems> span itemproplegalName>BEA systems/span> /a> /span> develops many important points about compile-time checking: what could be done with annotation processors and what requires more. For example, the processor does not provide the structure of the a hrefhttp://en.wikipedia.org/wiki/Abstract_syntax_tree>AST/a> and thereby b>does not allow flow analysis/b>./span>/p>p>A b itempropabout>processor/b> must implement the b itempropabout>em>a hrefhttp://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html>javax.annotation.processing.Processor/a>/em> interface/b>. The implementation should be b>specified/b> to the platform b>using the a hrefhttp://bdulac.github.io/note/spi>SPI/a>/b> system. An abstract class em>a hrefhttp://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/AbstractProcessor.html>AbstractProcessor/a>/em> is provided to help implementations./p>p> In a span itempropcitation itemscope itemtypehttp://schema.org/Article> a itempropurl hrefhttp://www.alexecollins.com/java-annotation-processor-tutorial/> tutorial about annotation processing, /a> span itempropauthor itemscope itemtypehttp://schema.org/Person> a itempropsameAs hrefhttps://github.com/alexec> span itempropname> span itempropgivenName>Alex/span> span itempropfamilyName>Collins/span> /span> /a> link itempropsameAs hrefhttp://www.alexecollins.com /> /span> details the span itempropabout>implementation of a compile-time processor/span> for the a itempropabout hrefhttp://docs.spring.io/autorepo/docs/spring/4.2.x/javadoc-api/org/springframework/transaction/annotation/Transactional.html> @Transactional annotation of the spring framework /a>. /span>/p> /div> /main> footer> div classcategories> span classcategory itempropabout> a href/java/> JAVA /a> /span> span classcategory itempropabout> a href/software/quality/> SOFTWARE QUALITY /a> /span> span classcategory itempropabout> a href/software/engineering/> SOFTWARE ENGINEERING /a> /span> span classcategory itempropabout> a href/programming-practice/> PROGRAMMING PRACTICE /a> /span> /div> span classpost-date> time datetime2016-07-18 itempropdatePublished> 18 July 2016 /time> /span> /footer>/article> article itempropblogPost itemscope itemtypehttp://schema.org/BlogPosting> header> link itempropurl href/note/lucene-map /> meta itempropheadline hrefA Lucene-based map /> h1>a href/note/lucene-map>span itempropname>A Lucene-based map/span>/a>/h1> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developer/span> span itempropaudienceType>Programmer/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://facebook.com/berenger.dulac /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> /header> main> div itempropmainEntityOfPage id/note/lucene-map classpost-content> p>Last year I needed to store strings in a em>a hrefhttps://docs.oracle.com/javase/7/docs/api/java/util/Map.html>Java Map/a>/em> using a limited memory./p>p>The solution was rather simple: using a em>a hrefhttps://lucene.apache.org/core/>Lucene/a>/em> index to store the content on disk. This would provide interesting access performances. Here is the em>Gist/em>:/p>p>script srchttps://gist.github.com/bdulac/2ba47e38b383fb885427.js>/script>/p> /div> /main> footer> div classcategories> span classcategory itempropabout> a href/java/> JAVA /a> /span> /div> span classpost-date> time datetime2016-01-29 itempropdatePublished> 29 January 2016 /time> /span> /footer>/article> article itempropblogPost itemscope itemtypehttp://schema.org/BlogPosting> header> link itempropurl href/note/solr-memory-mmap /> meta itempropheadline hrefApache Solr: JVM memory management and em>mmap/em> system calls /> h1>a href/note/solr-memory-mmap>span itempropname>Apache Solr: JVM memory management and em>mmap/em> system calls/span>/a>/h1> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developer/span> span itempropaudienceType>Programmer/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://facebook.com/berenger.dulac /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> /header> main> div itempropmainEntityOfPage id/note/solr-memory-mmap classpost-content> p>Unlike other indexing software like em>a hrefhttps://github.com/elastic/elasticsearch>Elasticsearch/a>/em>, em>Solr/em> can be deployed in any a hrefhttp://en.wikipedia.org/wiki/Web_container>em>Java Servlet/em> container/a>. The documentation provides an a hrefhttps://wiki.apache.org/solr/SolrTomcat>example with em>Apache Tomcat/em>/a>: this is our target environment at the em>MNHN/em>. Just like a standard em>Tomcat/em> installation, here comes the question of memory allocation to the JVM. Reading the a hrefhttps://wiki.apache.org/solr/SolrPerformanceFactors#Memory_allocated_to_the_Java_VM >em>Solr/em> section on the topic/a>, it was chosen to allow a large part of the RAM to the JVM (5GB on a total of 6: one single spared for the system). /p>p>We identified quickly a main problem: while indexing, the em>Solr/em> engine issued em>timeout/em> errors on em>select/em> queries. A a hrefhttp://stackoverflow.com/q/14635381/1207019>stackoverflow exchange/a> describes a similar behavior. We noticed on the server side an important usage of a hrefhttp://en.wikipedia.org/wiki/Virtual_memory>virtual memory/a>./p>p>As I answered in the exchange, we solved this problem a few months ago after reading a a hrefhttp://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html>blog post/a> by Uwe Schindler (a em>Solr/em> committer). With em>Solr 4/em> and several em>Solr 3/em> versions, you have to let an important share of your RAM free so that the system can use properly the em>mmap/em> system call. This is due to the introduction in em>Solr/em> of a new em>Lucene/em> component: the em>a hrefhttps://lucene.apache.org/core/3_5_0/api/core/org/apache/lucene/store/MMapDirectory.html>MMapDirectory/a>/em>. The blog post gives a plenty of informations on the system configuration. In our case, this solved the problem: we could finally index without any more em>timeout/em> issue./p> /div> /main> footer> div classcategories> span classcategory itempropabout> a href/java/> JAVA /a> /span> span classcategory itempropabout> a href/solr/> SOLR /a> /span> /div> span classpost-date> time datetime2015-04-12 itempropdatePublished> 12 April 2015 /time> /span> /footer>/article> article itempropblogPost itemscope itemtypehttp://schema.org/BlogPosting> header> link itempropurl href/note/sysml-callout /> meta itempropheadline hrefSysML Callout and UML /> h1>a href/note/sysml-callout>span itempropname>SysML Callout and UML/span>/a>/h1> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developer/span> span itempropaudienceType>Programmer/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://facebook.com/berenger.dulac /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> /header> main> div itempropmainEntityOfPage id/note/sysml-callout classpost-content> div>p>Recently, I participated in a a hrefhttp://stackoverflow.com/q/28084190/1207019>Stackoverflow exchange about the SysML em>Callout/em> concept/a>. The exchange was started in a wrong direction: the initial question was only about the UML language. This was a misconception as the em>Callout/em> node is a a hrefhttp://en.wikipedia.org/wiki/Systems_Modeling_Language>SysML/a> concept and that led to an inappropriate accepted answer which was in fact a non answer./p>p>I write this blog post because I think the topic is an important element in modeling. SysML is a UML profile defined in the frame of the OMG. The a target_blank hrefhttp://www.omg.org/spec/SysML/1.3/>SysML 1.3 formal specification/a> poorly defines the term as the effective conceptual definition appears in Annex A, p. 168:/p>pre>The callout notation provides a mechanism for representing relationships between model elements that appear on different diagram kinds./pre>p>Things become more complex to find the proper way to render a em>Callout/em>. More indications are available in the em>Allocation/em> section (p. 129):/p>pre>The allocation relationship can provide an effective means for navigating the model by establishing cross relationships, and ensuring the various parts of the model are properly integrated./pre>p>Later (p. 131):/p>pre>An «allocate» property callout uses the same shorthand notation as the «allocate» property compartment. This notation is also shown in Table 15.1./pre>p>Here is the table explaining the notation of allocations:/p>img src/assets/images/allocation.png styleborder-style: solid; />p>In some way, the SysML em>Callout/em> overlaps the em>CallBehaviorAction/em> action defined in the a target_blank hrefhttp://www.omg.org/spec/UML/2.4.1/>UML Superstructure 2.4.1 formal specification/a>, section 1.3.9 on p. 251. This is probably because SysML, as an UML profile, relies on the UML infrastructure./p>p>To be synthetic, relationships between model elements that appear on different diagrams are an important part of modeling. But the representation of a em>Callout/em> is, in my opinion, not very simple and clear./p>/div> /div> /main> footer> div classcategories> span classcategory itempropabout> STACKOVERFLOW /span> span classcategory itempropabout> a href/uml/> UML /a> /span> span classcategory itempropabout> SYSML /span> /div> span classpost-date> time datetime2015-01-25 itempropdatePublished> 25 January 2015 /time> /span> /footer>/article> article itempropblogPost itemscope itemtypehttp://schema.org/BlogPosting> header> link itempropurl href/note/polymeria-pages /> meta itempropheadline hrefPolymeria pages and Material Jekyll /> h1>a href/note/polymeria-pages>span itempropname>Polymeria pages and Material Jekyll/span>/a>/h1> div itempropaudience itemscope itemtypehttp://schema.org/Audience styledisplay: none;> span itempropaudienceType>Software developer/span> span itempropaudienceType>Programmer/span> /div> div itempropauthor itemscope itemtypehttp://schema.org/OrganizationRole styledisplay: none;> div itempropauthor itemscope itemtypehttp://schema.org/Person> span itempropname>Bérenger Dulac/span> link itempropsameAs hrefhttp://facebook.com/berenger.dulac /> link itempropsameAs hrefhttps://github.com/bdulac /> /div> /div> /header> main> div itempropmainEntityOfPage id/note/polymeria-pages classpost-content> div>p>I recently set up the a hrefhttp://bdulac.github.io/polymeria/>GitHub pages of the em>Polymeria/em> project/a>. This was done easily starting with the a hrefhttp://charbelrami.github.io/material-jekyll/>em>Material Jekyll/em>/a> project by a hrefhttps://github.com/charbelrami>Charbel Rami/a>./p>p>em>Material Jekyll/em> is a set of em>Polymer/em> components helping to set up a em>Jekyll/em> template. Few modifications where needed, a hrefhttps://github.com/charbelrami/material-jekyll/pull/2>one was pushed/a> to the initial repository as it could be useful to other users: colors customization with a single em>Jekyll/em> data file./p>/div> /div> /main> footer> div classcategories> span classcategory itempropabout> a href/web/> WEB /a> /span> span classcategory itempropabout> JEKYLL /span> span classcategory itempropabout> WEB COMPONENTS /span> span classcategory itempropabout> POLYMER /span> span classcategory itempropabout> GITHUB /span> /div> span classpost-date> time datetime2015-01-24 itempropdatePublished> 24 January 2015 /time> /span> /footer>/article> /div>nav classpagination rolenavigation> a classnewer-posts href/page2>← Older posts/a> span classpage-number>Page 1 of 5/span> /nav>footer classclean stylebackground-image: url(/assets/images/background.png); background-position: bottom; height: 60px;> p classcopyright>©2017, a hrefhttps://github.com/bdulac target_blank>Bérenger Dulac/a>. a hrefhttp://creativecommons.org/licenses/by-nc/2.5 target_blank>Some rights reserved/a>./p>/footer>/div>div>/div>/body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]