Sunday, April 2, 2023

Where can i get DDS?

 https://www.dds-foundation.org/where-can-i-get-dds/

 

Twin Oaks Computing, Inc. is a company dedicated to developing and delivering quality software solutions. 

Our full-featured implementation of the Data Distribution Service is measured in Kilobytes not Megabytes. This compact implementation is unique in the middleware industry. With this small library size, low line of code count, and minimal run-time resource requirements, our CoreDX DDS is a lightweight, cross-platform, cross-language IPC solution perfect for the full spectrum of IoT applications. For further information about Twin Oaks Computing, Inc. please visit: http://www.twinoakscomputing.com/

Wednesday, November 24, 2021

JavaFX and GraalVM

 JavaFX in the new era of GraalVM

https://gluonhq.com/javafx-in-the-new-era-of-graalvm/

Gluon Substrate takes away most of the complexity of using GraalVM Native Image. You can create an app in Java, test it on your desktop, and then compile and link the Java bytecode to a native image for a specific platform by defining a profile in Maven. The resulting binary can be deployed to the AppStore or Google Play. For a short intro on how this works, see this video about creating an app for iOS using the Gluon plug-in in Netbeans.

It’s needless to say that GraalVM Native Image opens an abundance of opportunities for JavaFX. Let’s take a look at the impact this evolution could have on the development of mobile applications.

Thursday, February 28, 2019

JavaFX pane for scaling arbitrary content nodes

https://github.com/miho/ScaledFX

JavaFX pane for scaling arbitrary content nodes (used in Vworkflows) by applying scale transformations. The ScalableContentPane scales its content to always fit the container bounds.

Saturday, November 17, 2018

AspectJ tutorials


AspectJ and AOP – The black magic of programming


https://blog.jayway.com/2015/09/03/aspectj-and-aop-the-black-magic-of-programming/

AspectJ – Dictionary

Aspects

The easiest way to describe aspects is as a funky Java Class. An Aspect contains other things than a normal class such as; pointcuts, advice, advice bodies and inner-type declarations. An aspect may also contain regular java classes and methods.

Pointcuts

Defines, in a multitude of different ways, a point in the code. The pointcut defines when an advice should be run.

Advice / Advice Body

Similar to a java method; contains the code that will be run once a pointcut has been triggered.

Annotation – Not AOP specific

Consists of meta-data and can be used at methods, classes, parameters, packages and in variables.
Annotations can contain an optional list of element-value pairs, such as ‘yourProperty = “someValue”‘ in the example above. In AspectJ we can define a pointcut by looking for annotations. The pointcut and advice can then use the element-value pairs from the annotation.

Weaving / Aspect weaving

There are a few different ways to inject the AOP code in our application, but one common denominator is that they all require some type of extra step to be applied to our code. This extra step is called weaving.

Compile-time weaving

If you have both the source code of the aspect and the code that you are using aspects in, you can compile your source-code and the aspect directly with an AspectJ compiler.

Post-compile weaving / Binary weaving

If you can’t, or don’t want to use source-code transforms to weave the aspects into the code, you can take already compiled classes or jars and inject aspects.

Load-time weaving

Acts the same way as post-compile weaving / binary weaving but waits to inject aspects into the code until the class loader loads the class file. This requires one or more weaving class loaders.

Saturday, September 22, 2018

Friday, September 7, 2018

ByteBuffer flip vs rewind

https://stackoverflow.com/questions/16461284/difference-between-bytebuffer-flip-and-bytebuffer-rewind


flip() makes it ready for write() (or for get())
         rewind() makes it ready for read() (or for put())

get() Example;
You might want to read data from the buffer (assuming that you had initially stored it in there)and use it for something else such as converting to a string and manipulate it for further use.
ByteBuffer buf = ByteBuffer.allocateDirect(80);
private String method(){
buf.flip();
byte[] bytes = byte[10]; //creates a byte array where you can place your data 
buf.get(bytes); //reads data from buffer and places it in the byte array created above
return bytes;
}
write() Example; After you have read data from socket channel into the buffer you might want to write it back to socket channel - assuming that you want to implement something like a server that echos same message received from client.
So you will read from channel to buffer and from buffer back to channel
SocketChannel socketChannel = SocketChannel.open();
...

ByteBuffer buf = ByteBuffer.allocateDirect(80);

int data = socketChannel.read(buf); // Reads from channel and places it into the buffer
while(data != -1){ //checks if not end of reading
buf.flip();        //prepares for writing
....
socketChannel.write(buf) // if you had initially placed data into buf and you want to read 
                         //from it so that you can write it back into the channel


  }

Saturday, July 7, 2018

How to build smaller Docker containers

https://www.youtube.com/watch?v=wGz_cbtCiEA

In this episode of Kubernetes Best Practices, Sandeep Dinesh shows how you can build small containers to make your Kubernetes deployments faster and more secure. See the associated article here → https://goo.gl/zjejFj Google Container Registry → https://goo.gl/ilwubv Google Container Builder → https://goo.gl/l1Obc1 Container Registry Vulnerability Scanning → https://goo.gl/5EiyLe Google Kubernetes Engine → https://goo.gl/2V8yah Docker Multistage Builds → https://goo.gl/nQmwW4