search for: serializable

Displaying 20 results from an estimated 63 matches for "serializable".

2006 May 19
7
AR transactions and isolation levels
...;s my first real ''go'' at transactions, so I may be mistaken about how things really work. Anyway.. Consider this example code: Class Invoice < ActiveRecord::Base def self.create_new self.transaction do self.connection.execute("set transaction isolation level serializable, read write") last = Invoice.find(:first, :order => "invoice_no desc") invoice = Invoice.new invoice.invoice_no = last.invoice_no + 1 sleep(10) invoice.save! end end end ______ I couldn''t find an ''AR way'' to set the i...
2006 Apr 12
1
How best to handle non-serializable session data?
I have a piece of data that needs to persist across requests that is not serializable. It''s a Rubyful soup parse tree and it''s very expensive to instantiate and I need it for a while in my app. Therefore, by default, it can''t be stored in the session since the default session storage mechanism is pstore. One option I have to is change the session stor...
2006 May 08
5
The true merit of non-memory based session stores
All, There is an assertion in AWDWR that the in-memory session store is "too simplistic." However, I find myself nudged in this direction by the need to keep a non-serializable model attribute available in my session and the relative pain of implementing either a custom serialization scheme for the model in question (or a custom caching mechanism so that I can store my attribute in memory). When I first read that the in - memory storage method was frowned upon, I was...
2013 Nov 27
3
[PATCH v3 RFC 3/4] virtio_blk: avoid calling blk_cleanup_queue() on device loss
...lready set (although the actual device > is already gone, e.g. virsh detach), blk_cleanup_queue() would be triggered > resulting in a possible hang. This hang is caused by e.g. 'in-flight' requests > that will never complete. This is a weird situation, and most likely not > 'serializable'. Hmm interesting. Implement some timeout and probe device to make sure it's still alive? > Signed-off-by: Heinz Graalfs <graalfs at linux.vnet.ibm.com> > --- > drivers/block/virtio_blk.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/...
2013 Nov 27
3
[PATCH v3 RFC 3/4] virtio_blk: avoid calling blk_cleanup_queue() on device loss
...lready set (although the actual device > is already gone, e.g. virsh detach), blk_cleanup_queue() would be triggered > resulting in a possible hang. This hang is caused by e.g. 'in-flight' requests > that will never complete. This is a weird situation, and most likely not > 'serializable'. Hmm interesting. Implement some timeout and probe device to make sure it's still alive? > Signed-off-by: Heinz Graalfs <graalfs at linux.vnet.ibm.com> > --- > drivers/block/virtio_blk.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/...
2015 Apr 23
3
Usar una matriz sparse desde python a R
...Me pregunto si es posible pasar más o menos directamente de python a R (nada de pasar a texto el objeto, porque eso me lleva al mismo punto de llenar la sparse en R). He probado rPython (gracias Carlos Gil por esta librería!) pero suelta este error raise TypeError(repr(o) + " is not JSON serializable") TypeError: <138493x26744 sparse matrix of type '<type 'numpy.int64'>' with 19761138 stored elements in LInked List format> is not JSON serializable ¿Hay alguna otra posibilidad? Gracias! -- Pedro Concejero BI & Big Data - Internal Exploitation - Telefónic...
2013 Nov 27
2
[PATCH v3 RFC 3/4] virtio_blk: avoid calling blk_cleanup_queue() on device loss
...device > >>is already gone, e.g. virsh detach), blk_cleanup_queue() would be triggered > >>resulting in a possible hang. This hang is caused by e.g. 'in-flight' requests > >>that will never complete. This is a weird situation, and most likely not > >>'serializable'. > > > >Hmm interesting. Implement some timeout and probe device to make sure > >it's still alive? > > but there is always some race, isn't it? To clarify, why this might not be very elegant, a timer-based solution for surprise removal during driver cleanup mi...
2013 Nov 27
2
[PATCH v3 RFC 3/4] virtio_blk: avoid calling blk_cleanup_queue() on device loss
...device > >>is already gone, e.g. virsh detach), blk_cleanup_queue() would be triggered > >>resulting in a possible hang. This hang is caused by e.g. 'in-flight' requests > >>that will never complete. This is a weird situation, and most likely not > >>'serializable'. > > > >Hmm interesting. Implement some timeout and probe device to make sure > >it's still alive? > > but there is always some race, isn't it? To clarify, why this might not be very elegant, a timer-based solution for surprise removal during driver cleanup mi...
2006 Jun 18
1
Put an arbitary hash into ActiveRecord
Did someone encountered a problem of putting a hash of values into AR, into a certain field? Essentially I need some denormalized, freeform serializable hash to which the user can add keys and values, and handle accessors from there would be lovely too. I remember that AR has "serialize" but did someone actually use it? I heard nothing but complaints about rich objects in AR columns. TIA. -- Julian ''Julik'' Tarkhan...
2012 Oct 24
1
Uniqueness and sql serialize
Hi fellow programmers, I was looking for how to keep integrity in some financial transactions and I saw this "This could even happen if you use transactions with the ‘serializable’ isolation level." in the uniqueness page http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#method-i-validates_uniqueness_of. How this is possible with the serializablo isolation level? Aren''t the select and update done in the same transaction? -- You...
2013 Nov 27
7
[PATCH v3 RFC 0/4] virtio: add 'surprize_removal' to virtio_device
Hi, here is an updated patch-set to my v2 RFC virtio: add new notify() callback to virtio_driver This RFC introduces a new virtio_device entry 'surprize_removal' instead of a new 'notify' callback in struct virtio_driver. When an active virtio block device is hot-unplugged from a KVM guest, affected guest user applications are not aware of any errors that occur due to the lost
2013 Nov 27
7
[PATCH v3 RFC 0/4] virtio: add 'surprize_removal' to virtio_device
Hi, here is an updated patch-set to my v2 RFC virtio: add new notify() callback to virtio_driver This RFC introduces a new virtio_device entry 'surprize_removal' instead of a new 'notify' callback in struct virtio_driver. When an active virtio block device is hot-unplugged from a KVM guest, affected guest user applications are not aware of any errors that occur due to the lost
2007 May 15
4
Need help with singleton worker
We have a fairly expensive task that we''d rather not schedule too many instances of in parallel. Couldn''t get pool_size to limit the amount of workers, and I figure that''s hardly optimal anyway, so would like to have the work queued up for a single named worker instead, running as soon as possible. Using MiddleMan.schedule_worker() with :job_key does start off a
2019 Sep 26
2
[RFC] Propeller: A frame work for Post Link Optimizations
...ated, and harder to understand, than a compiler IR designed for optimizations. Thanks for the feedback, I am not sure I fully understand your concerns but let me try to make some of the things clearer: * Propeller relinks. Specifically, it regenerates ELF object files from MIR. Even if MIR were serializable, we would still be starting before CFI instruction inserter pass and then regenerate the native ELF objects. * All the code transformations we are planning to do for futuristic optimizations is on the MIR just like you noted in a previous email. For example, prefetch insertion was one optimization...
2006 Nov 20
2
Passing object into results - "can''t convert DRb::DRbUnknown into Hash - (TypeError)"
Hi, I''m using backgroundrb to get RSS feeds and pass them back to the controller. I''m using the Ruby RSS library to parse the feed, which returns an RSS object. After that I pass the object into the results hash, but that''s when this error occurs. Basically, this is what I have: rss = RSS::Parser.parse(response.body) results[:feed] = rss # error! 20061120-15:46:19
2019 Sep 27
5
[RFC] Propeller: A frame work for Post Link Optimizations
...> optimizations. > > > > Thanks for the feedback, I am not sure I fully understand your > > concerns but let me try to make some of the things clearer: > > > > * Propeller relinks. Specifically, it regenerates ELF object files > > from MIR. Even if MIR were serializable, we would still be starting > > before CFI instruction inserter pass and then regenerate the native > > ELF objects. > > Now I'm confused. Why are you regenerating the ELF files? TLDR; We are regenerating ELF files from optimized IR to keep the cost of generating basic bloc...
2006 Feb 14
25
Rails and background tasks/threads
I am just getting into web servers/web applications and rails as well so bear with me. I am trying to write a web app that, based on a users input from the browser, will perform some task, and update the browser (ala ajax style) as needed and/or provide a way for the user to control the background task. Now, I have more experience with java servlets, which makes this easy enough for a beginner.
2016 Feb 10
4
[RFC] Error handling in LLVM libraries.
Hi Rafael, > What prevents you from using a diag handler in the jit server that > sends errors/warnings over the RPCChannel? What would you do with errors that can't reasonable be serialized when they reach the diagnostic handler? And what would you do with the serialized bytes on the client end? - Lang. Sent from my iPhone On Feb 10, 2016, at 10:31 AM, Rafael Espíndola
2005 Apr 21
3
Objects in R
...S4. (1)Novices simply don't understand it. Students are trained in "standard" object-oriented technique and this wonkish offshoot(puritanical functional programming) just increases the information costs to using R and thus decreases the demand. (2)Large frameworks benefit from serializable/storable objects which contain both functionality and modifiable values. S4 stores "class" information and R.oo does not upon "save()"ing, but there are still real hindrances to "trading" objects, which is -extraordinarily- important in creating industrial-variety R-b...
2007 Dec 27
5
Rails 2.02 dropped JSON attribute tag ?
Hey there I was scratching my head over why my application breaks when I run on a local server but works on my remote server. It turns out that my local server is Rails 2.0.2 and my remote server is 1.2.3 and I expect the tag "attributes" to be passed with a json stream, before parsing. Unfortunately, this was dropped in 2.0.2. Is there any documentation on this? Any way to get it back?