Git Product home page Git Product logo

Comments (17)

krzysztofzienkiewicz avatar krzysztofzienkiewicz commented on May 31, 2024 1

I thought about that. I don't think we'll want to serialize those at all. Instead I'm leaning towards having overloads on the deserialization call that accept a functional callback that will be used to recreate the context given the expression and flags.

from hyperscan-java.

toddleo avatar toddleo commented on May 31, 2024

I believe the link is broken. :(

from hyperscan-java.

gliwka avatar gliwka commented on May 31, 2024

Fixed it, thanks :-) Intel moved their open source repositories from the 01org to the Intel organization. Will have to fix all the other links, too (see issue #38)

from hyperscan-java.

krzysztofzienkiewicz avatar krzysztofzienkiewicz commented on May 31, 2024

I was thinking of implementing this feature because it might be very useful on a project I'm currently working on but after looking into it a bit I've identified some limitations/design issues.

  1. Should the serialized database be usable directly by hyperscan or is it sufficient that only hyperscan-java be able to load this back in? I ask this because hyperscan-java's Database instance holds on to the list of wrapper's expression instanced used to compile it. This is needed by the Scanner API so that returned matches can be associated with the original expressions. Unfortunately I don't think that hyperscan APIs allow for interrogating a database about its expressions (please correct me if I'm wrong). This implies that the wrapper's serialization implementation will also need to serialize the expressions so the resulting artifact will not be usable by anything other than the wrapper. I could also produce 2 separate artifacts but that API seems overly complex and error prone on the user end.

  2. If I provide serialization support there is a good chance someone will try to load the database on a different platform than it was compiled. Should this be a supported usecase? If so then I also need to provide compilation API that accepts target platform. Currently you call the hyperscan compile methods with null meaning compile for the current host platform. Personally I think I'm fine with this limitation but I wanted to see what you thought.

from hyperscan-java.

gliwka avatar gliwka commented on May 31, 2024

Thank you very much for considering a contribution.

I think the tradeoffs proposed by you are fine.

One additional thought about the serialization: Right now expressions can have a context reference (Object) assigned to them to enable association between expressions and other business objects. This might need some additional consideration.
https://github.com/LocateTech/hyperscan-java/blob/3085f047772d21504c98c050c82431777205bacc/src/main/java/com/gliwka/hyperscan/wrapper/Expression.java#L118

from hyperscan-java.

gliwka avatar gliwka commented on May 31, 2024

I agree, that would be the best way to proceed. Looking forward to your contribution!

from hyperscan-java.

krzysztofzienkiewicz avatar krzysztofzienkiewicz commented on May 31, 2024

I opened the PR here: #50

from hyperscan-java.

gliwka avatar gliwka commented on May 31, 2024

Closed by #50. Will be part of the next release.

from hyperscan-java.

krzysztofzienkiewicz avatar krzysztofzienkiewicz commented on May 31, 2024

Thanks @gliwka. Any idea when the next release might be? We're trying to determine if my team should fork and publish to our internal nexus or if there will be an official release by the time we need this feature.

from hyperscan-java.

gliwka avatar gliwka commented on May 31, 2024

Today :-)

from hyperscan-java.

krzysztofzienkiewicz avatar krzysztofzienkiewicz commented on May 31, 2024

Is there an update on the release?

from hyperscan-java.

gliwka avatar gliwka commented on May 31, 2024

@krzysztofzienkiewicz

Sorry for the delay, the flu is dragging me down.

v0.6.0 has just been released to maven central.

from hyperscan-java.

krzysztofzienkiewicz avatar krzysztofzienkiewicz commented on May 31, 2024

Hope you feel better soon.
I noticed that the changes were merged to master but I can't seem to find the artifacts on maven central.

from hyperscan-java.

gliwka avatar gliwka commented on May 31, 2024

https://repo1.maven.org/maven2/com/gliwka/hyperscan/hyperscan/0.6.0/ exists, but the pom and .jar is missing inside. I'll release a v0.6.1, since I can't take a release down once it's published.

from hyperscan-java.

gliwka avatar gliwka commented on May 31, 2024

I'm getting hit by travis-ci/travis-ci#9555, I'm investigation how to fix this.

from hyperscan-java.

gliwka avatar gliwka commented on May 31, 2024

The CI environment (Travis) is switching IP addresses during uploads, which causes Nexus to think it's two different releases and it creates multiple different staging repositories per IP address, which in turn caused an incomplete release.

Using nexus-staging-maven-plugin fixes the issue.

v0.6.2 is now released and works fine.

It's already on OSS Sonatype (https://oss.sonatype.org/content/repositories/releases/com/gliwka/hyperscan/hyperscan/0.6.2/) and should sync to the other maven central repositories in the 2 hours.

from hyperscan-java.

krzysztofzienkiewicz avatar krzysztofzienkiewicz commented on May 31, 2024

Thanks so much @gliwka

from hyperscan-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.